<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
/*
    const a = 100;

    for (var i=0;i<5;i++){
        console.info(i);
    }
    console.info("我在循环外："+ i);
    for (let x=0;x<5;x++){
        console.info(x);
    }

    const b = `scc
                bbb
                ccc
                ddd
              `;
    const arr = [10,11,12];
    const[x,y,z] = arr;
    alert(x+'--'+y+'--'+z);*/

   /* const fun = (a,b) => {
        return a + b;
    }

    alert(fun(1,2));*/

   /*const per = {
       name: 'zhangsan',
       eat1 : function(food){
           console.log(this.name + "正在吃" + food);
       },
       eat2: food =>{console.log(per.name + "正在吃" + food)},
       eat3(food){
           console.log(this.name + "正在吃" + food)
       }
   }*/


   /*per.eat1("香蕉");
   per.eat2("苹果");
   per.eat3("桃子");*/

   /*const p = {
       name:"list",
       age:30
   };*/
   /*const fun = p1 =>{
       console.info (p1.name + '---' + p1.age);
   }

   fun(p);*/

  /* const fun = ({name,age}) => {
       console.info (name + '---' + age);
   }

    fun(p);*/

  let arr = [1,2,3];
  /*arr = arr.map(b => parseInt(b))
    console.log(arr);*/

  console.log(arr.reduce((a,b) => a + b));
</script>
</html>